function Father(){
    this.name = name
    this.age = age
}

Father.prototype.getName = function (){
    console.log(this.name)
}

function Son(name) {
    Father.call(this, name)
}

function inheraFunction(son, father) {
    let prototype = object(father.prototype)
    prototype.constructor = son
    son.prototype = prototype
}

inheraFunction(Son, Father)

Son.prototype.getName = function (){
    console.log('hhhhh')
}
